const isProd = process.env.NODE_ENV === 'production'

module.exports = {
  devServer: {
    proxy: {
      '/api': {
        target: 'http://wfc2018-api.weddingee.com'
      }
    }
  },
  productionSourceMap: false,
  publicPath: isProd ? '/' : '/',
  outputDir: 'dist',
  assetsDir: 'static',
  css: {
    loaderOptions: {
      sass: {
        data: `@import "@/styles/variables.scss";` // 指定全局变量
      }
    }
  }
}
